package com.elitesland.core.exception.handler;

import lombok.extern.slf4j.Slf4j;

/**
 * <pre>
 * [功能说明]
 * </pre>
 *
 * @author Mir
 * @date 2020/6/22
 */
@Slf4j
//@ControllerAdvice
public class GlobalExceptionHandler {

//    @ExceptionHandler(BadRequestException.class)
//    public ApiResult<Object> handleBadRequestException(BadRequestException e) {
//        log.error(ThrowableUtil.getStackTrace(e));
//        return ApiResult.fail(ApiCode.VERIFICATION_CODE_EXCEPTION, ThrowableUtil.getStackTrace(e));
//    }

//    @ExceptionHandler(BusinessException.class)
//    @ResponseBody
//    public ApiResult<Object> handleBusinessException(BusinessException e) {
//        log.error(ThrowableUtil.getStackTrace(e));
//        return ApiResult.fail(e.getCode(), e.getMessage());
//    }

//    @ExceptionHandler(BadJwtTokenException.class)
//    public ApiResult<Object> handleAuthenticationException(AuthenticationException e) {
//        log.error(ThrowableUtil.getStackTrace(e));
//        return ApiResult.fail(ApiCode.VERIFICATION_CODE_EXCEPTION, ThrowableUtil.getStackTrace(e));
//    }
}
